class Task5:
    def run(self, string, length):
        space_count = 0
        for i in range(length):
            if string[i] == ' ':
                space_count += 1

        modified_length = length + 2 * space_count
        index = length - 1
        modified_index = modified_length - 1
        while index >= 0:
            if string[index] == ' ':
                string[modified_index] = '0'
                string[modified_index - 1] = '2'
                string[modified_index - 2] = '%'
                modified_index -= 3
                index -= 1
            else:
                string[modified_index] = string[index]
                modified_index -= 1
                index -= 1
